/*

  The contents of this file are subject to the Mozilla Public License Version
  1.1 (the "License"); you may not use this file except in compliance with
  the License. You may obtain a copy of the License at 
  
           http://www.mozilla.org/MPL/ 
  
  Software distributed under the License is distributed on an "AS IS" basis,
  WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  for the specific language governing rights and limitations under the License. 
  
  The Original Code is KazeOS Framework.
  
  The Initial Developer of the Original Code is
  ALCARAZ Marc (aka eKameleon) <ekameleon@gmail.com>.
  Portions created by the Initial Developer are Copyright (C) 2004-2010
  the Initial Developer. All Rights Reserved.
  
  Contributor(s) :
  
*/

/////// secure mode

key    = null ;

/**
 * Open and read the secure.properties to create the stratusKey attribute in the config singleton.
 * Note : 
 * Rename "secure_tmp.properties" in "secure.properties" and insert your personal stratus key in the file.
 * 
 * Additional developer documentation may be found in the Flash Player 10 API documentation for the NetConnection 
 * and NetStream ActionScript classes, the Stratus FAQ, and the Developing End-to-End Applications using Flash Player 10 
 * and Stratus Service article in the Adobe Developer Center.
 * 
 * Read : <a href="http://www.adobe.com/devnet/flashplayer/articles/rtmfp_stratus_app.html">Stratus service for developing end-to-end applications using RTMFP in Flash Player</a>.
 */
secure = new File("secure.properties") ; 

if ( secure.exists )
{
    if ( secure.open("text", "read") )
    {
       key = secure.readln() ;
    }
}

delete secure ;

///

/**
 * The config singleton of the application.
 */
config =
{
    stratusKey : key || "xxxxxx" ,
    referrers  :
    [
        
    ]
} ;